package lion.dev.image;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public interface IImageHandler {

	void read(InputStream src) throws IOException;

	void read(BufferedImage image);

	IImageHandler compress(float quality, String type);

	IImageHandler resize(int width, int height);

	IImageHandler resizeWidth(int width);

	IImageHandler resizeHeight(int height);

	IImageHandler resizeScale(float percent);

	IImageHandler rotate(Rotation rotation);

	IImageHandler crop(int x, int y, int width, int height);

	void write(OutputStream os, String type) throws IOException;

	IImageHandler watermark(BufferedImage watermark, Directoin directoin, float opacity);

	IImageHandler watermark(BufferedImage watermark, int x, int y, float opacity);

	IImageHandler sharpen(int times);

	IImageHandler limit(int maxwidth, int maxheight);
}
